import { createRouter, createWebHistory } from 'vue-router';
import Menu from '@/views/menu/index.vue'
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index.vue')
  },
  {
    name: 'menu',
    path: '/menu',
    component: Menu,
    children: [
      {
        name: 'home',
        path: '/home',
        component: () => import('@/views/home/index.vue')
      },
    ]
  },
  {
    name: '404',
    path: '/:catchAll(.*)',
    component: () => import('@/views/404/index.vue')
  }
]
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
